@*
* Copyright 2016 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*@

@(jobDefId: String, graphType: String, results: Html)

@main("Dr. Elephant - Job History", "jobhistory") {

  <!-- The Search panel-->
  @tags.column(12) {
    @tags.panel(){ Job History } {
      <form id="job-history-form" role="form" method="get" action="@routes.Application.oldJobHistory()">
        <div class="form-group">
          <label for="form-job-def-id">Job Definition URL/ID</label>
          <input type="text" class="form-control" id="form-job-def-id" name="job-def-id" placeholder="Job Def URL/ID" value="@jobDefId">
        </div>
        <label for="graphType">Filter</label>
        <select class="form-control" name="select-graph-type" id="graphType">

          @if(graphType=="resources") {
            <option value="resources" selected>Resources</option>
          } else {
            <option value="resources">Resources</option>
          }

          @if(graphType=="time") {
            <option value="time" selected>Time</option>
          } else {
            <option value="time">Time</option>
          }

          @if(graphType=="heuristics") {
            <option value="heuristics" selected>Heuristics</option>
          } else {
            <option value="heuristics">Heuristics</option>
          }

        </select>
        <br>
        <button type="submit" class="btn btn-default">Search</button>
      </form>
    }
  }

  @tags.column(12) {
    @results
  }

}
